package com.water_work_form.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 基础表——曲线信息
 * </p>
 *
 * @author xuke
 * @since 2023-08-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="BasicCurve对象", description="基础表——曲线信息")
public class BasicCurve implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty(value = "项目名称")

    private String name;

    @ApiModelProperty(value = "制作时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createDate;

    @ApiModelProperty(value = "有效日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date effectiveDate;

    @ApiModelProperty(value = "斜率")
    private String slope;

    @ApiModelProperty(value = "截距")
    private String intercept;

    @ApiModelProperty(value = "相关系统")
    private Float coefficient;

    @ApiModelProperty(value = "调零介质")
    private String medium;

    @ApiModelProperty(value = "比色皿规格")
    private String cuvette;

    @ApiModelProperty(value = "标准物质名称")
    private String standardName;

    @ApiModelProperty(value = "标准物质来源")
    private String standardSource;

    @ApiModelProperty(value = "标准物质编号")
    private String standardNo;

    @ApiModelProperty(value = "标准物质浓度")
    private String standardConcentration;

    @ApiModelProperty(value = "使用液浓度")
    private String liquidConcentration;

    @ApiModelProperty(value = "使用液配制")
    private String liquidPreparation;

    @ApiModelProperty(value = "校准曲线")
    private String calibrationCurve;

    @Override
    public String toString() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String effectiveDateString = sdf.format(effectiveDate);
        String createDateString = sdf.format(createDate);
        return "{\"id\":" + id + ",\"name\":\"" + name + "\",\"createDate\":\"" + createDateString + "\",\"effectiveDate\":\"" + effectiveDateString + "\",\"effectiveDate\":\"" + effectiveDateString +
                "\",\"slope\":\"" + slope + "\",\"intercept\":\"" + intercept + "\",\"coefficient\":\"" + coefficient + "\",\"medium\":\"" + medium + "\",\"cuvette\":\"" + cuvette + "\",\"standardName\":\"" + standardName +
                "\",\"standardSource\":\"" + standardSource + "\",\"standardNo\":\"" + standardNo + "\",\"standardConcentration\":\"" + standardConcentration + "\",\"liquidConcentration\":\"" + liquidConcentration +
                "\",\"liquidPreparation\":\"" + liquidPreparation + "\",\"calibrationCurve\":\"" + calibrationCurve +"\"}";
    }

}
